namespace EventBus
{
    /// <summary>
    /// 广播并返回监听方的返回值
    /// </summary>
    public interface IEventBroadcastAndReturn
    {
        /// <summary>
        /// 异步广播消息， 并异步返回最后一个消息监听方的返回值， 监听方可以异步处理消息
        /// </summary>
        /// <param name="sender">发送方</param>
        /// <param name="eventName">事件名</param>
        /// <typeparam name="">返回值类型</typeparam>
        /// <typeparam name="TResult">返回值类型</typeparam>
        /// <returns>异步返回监听方的返回值</returns>
        TResult BroadcastAndReturn<TResult>(object sender, string eventName);
        TResult BroadcastAndReturn<T1, TResult>(object sender, string eventName, T1 arg1);
        TResult BroadcastAndReturn<T1, T2, TResult>(object sender, string eventName, T1 arg1, T2 arg);
        TResult BroadcastAndReturn<T1, T2, T3, TResult>(object sender, string eventName, T1 arg1,
            T2 arg2, T3 arg3);
        TResult BroadcastAndReturn<T1, T2, T3, T4, TResult>(object sender, string eventName,
            T1 arg1, T2 arg2, T3 arg3, T4 arg4);
        TResult BroadcastAndReturn<T1, T2, T3, T4, T5, TResult>(object sender, string eventName,
            T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
        TResult BroadcastAndReturn<T1, T2, T3, T4, T5, T6, TResult>(object sender, string eventName,
            T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
        TResult BroadcastAndReturn<T1, T2, T3, T4, T5, T6, T7, TResult>(object sender, string eventName,
            T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
        TResult BroadcastAndReturn<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(object sender, string eventName,
            T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
    }
}